using System;
using System.Collections.Generic;

namespace SqlInjectionScanner.Models
{
    /// <summary>
    /// 注入风险等级
    /// </summary>
    public enum RiskLevel
    {
        Low,
        Medium,
        High,
        Critical
    }

    /// <summary>
    /// 注入类型
    /// </summary>
    public enum InjectionType
    {
        SqlInjection,
        XssInjection,
        CommandInjection,
        Unknown
    }

    /// <summary>
    /// 注入模式定义
    /// </summary>
    public class InjectionPattern
    {
        /// <summary>
        /// 模式ID
        /// </summary>
        public string Id { get; set; } = Guid.NewGuid().ToString();

        /// <summary>
        /// 模式名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 模式描述
        /// </summary>
        public string Description { get; set; } = string.Empty;

        /// <summary>
        /// 正则表达式模式
        /// </summary>
        public string RegexPattern { get; set; } = string.Empty;

        /// <summary>
        /// 风险等级
        /// </summary>
        public RiskLevel RiskLevel { get; set; }

        /// <summary>
        /// 注入类型
        /// </summary>
        public InjectionType InjectionType { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; } = true;
    }
}